This application relates generally to digital image processing.
Digital image processing may involve pixel group processing. Digital image processing may be used in cameras, scanners, and video applications, as examples. Pixel group processing involves a group of proximate pixels surrounding a center pixel. The pixels that surround the center pixel may provide information about brightness in a processed region. This brightness information may be utilized in connection with spatial filtering.
Any image may be composed of a plurality of frequency components including both low, high and intermediate frequencies. High spatial frequency components generally involve rapid brightness transitions. Low spatial frequency components involve slowly changing brightness transitions. Generally high frequencies may be found in association with sharp edges or points where white to black transitions occur within one or two pixels, as two examples.
An image may be filtered to accentuate or reduce any particular band of spatial frequencies such as high or low frequencies. Digital image processing techniques for removing particular frequency bands may be called spatial filtering operations.
Spatial filters may be implemented using a spatial convolution. A spatial convolution calculates what is going on with the pixel brightness around a particular processed pixel. The spatial convolution process may use a finite impulse response (FIR) filter.
A spatial convolution process may move across a representation of an image, pixel-by-pixel, placing resulting pixels in an output image. The brightness of each output pixel may depend on the input pixels that surround a particular processed pixel. A spatial convolution may calculate a spatial frequency in the area of a central pixel. As a result, the convolution may be capable of achieving filtering based on a region's spatial frequency content.
A spatial convolution may use a mathematical construction of the input pixel and its neighbors to determine an output pixel brightness value. A kernel is a group of pixels used to determine a mathematical calculation of output pixel brightness values. Kernel dimensions are generally that of a square with an odd number of values in each dimension. Thus, a kernel may have dimensions of 1×1, which would amount to a point, 3×3, 5×5 and so on. The greater the kernel size, the more neighboring pixels that are used in the calculation of the pixel brightness value.
A weighted average calculation is called a linear process. A weighted average may be utilized to determine the pixel brightness value. A linear process involves a summation of elements multiplied by constant values. The elements are pixel brightnesses in the kernel and the constant values are the weights or convolution coefficients.
Taking as an example a 3×3 kernel convolution, a center pixel is evaluated in view of its eight neighbors. A convolution mask may be utilized to produce an output pixel value. The center pixel and its eight neighbors are multiplied by their respective convolution coefficients and the multiplicands may be summed. The result is placed in the output image at the same center pixel location. The process continues pixel-by-pixel for the pixels in a representation of an input image.
Thus, the equation for the spatial convolution process is follows:O(x,y)=aI(x−1,y−1)+bI(x,y−1)+cI(x+1,y−1)+dI(x−1,y)+eI(x,y)+fI(x+1,y)+gI(x−1,y+1)+hI(x,y+1)+iI(x+1,y+1).
Common spatial filtering operations may include high-pass, low-pass and edge enhancement filters. Other filtering operations may be utilized as well. A problem arises in that different kernel sizes may be needed in different situations. Conventional convolution masks generally only determine a single kernel size. In some cases, a plurality of difference kernels may be needed. For example, in some cases, issues arise with respect to pixels closer to and/or further away from the current pixel.
Thus, there is a need for a system which provides multiple symmetrical filters at the same time.